.class Ljavax/microedition/lcdui/Display$AlertTimeout;
.super Ljava/lang/Object;
.source "Display.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Ljavax/microedition/lcdui/Display;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "AlertTimeout"
.end annotation


# instance fields
.field private final this$0:Ljavax/microedition/lcdui/Display;

.field time:I


# direct methods
.method constructor <init>(Ljavax/microedition/lcdui/Display;I)V
    .locals 0
    .parameter
    .parameter "time"

    .prologue
    .line 373
    iput-object p1, p0, Ljavax/microedition/lcdui/Display$AlertTimeout;->this$0:Ljavax/microedition/lcdui/Display;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 374
    iput p2, p0, Ljavax/microedition/lcdui/Display$AlertTimeout;->time:I

    .line 375
    return-void
.end method


# virtual methods
.method public run()V
    .locals 7

    .prologue
    .line 379
    :try_start_0
    iget v4, p0, Ljavax/microedition/lcdui/Display$AlertTimeout;->time:I

    int-to-long v4, v4

    invoke-static {v4, v5}, Ljava/lang/Thread;->sleep(J)V
    :try_end_0
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0

    .line 384
    :goto_0
    iget-object v4, p0, Ljavax/microedition/lcdui/Display$AlertTimeout;->this$0:Ljavax/microedition/lcdui/Display;

    invoke-static {v4}, Ljavax/microedition/lcdui/Display;->access$000(Ljavax/microedition/lcdui/Display;)Ljavax/microedition/lcdui/Displayable;

    move-result-object v2

    .line 385
    .local v2, d:Ljavax/microedition/lcdui/Displayable;
    if-eqz v2, :cond_0

    instance-of v4, v2, Ljavax/microedition/lcdui/Alert;

    if-eqz v4, :cond_0

    .line 386
    move-object v0, v2

    check-cast v0, Ljavax/microedition/lcdui/Alert;

    move-object v1, v0

    .line 387
    .local v1, alert:Ljavax/microedition/lcdui/Alert;
    iget v4, v1, Ljavax/microedition/lcdui/Alert;->time:I

    const/4 v5, -0x2

    if-eq v4, v5, :cond_0

    .line 388
    invoke-virtual {v1}, Ljavax/microedition/lcdui/Alert;->getCommandListener()Ljavax/microedition/lcdui/CommandListener;

    move-result-object v4

    invoke-virtual {v1}, Ljavax/microedition/lcdui/Alert;->getCommands()Ljava/util/Vector;

    move-result-object v5

    const/4 v6, 0x0

    invoke-virtual {v5, v6}, Ljava/util/Vector;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Ljavax/microedition/lcdui/Command;

    invoke-interface {v4, p0, v1}, Ljavax/microedition/lcdui/CommandListener;->commandAction(Ljavax/microedition/lcdui/Command;Ljavax/microedition/lcdui/Displayable;)V

    .line 391
    .end local v1           #alert:Ljavax/microedition/lcdui/Alert;
    :cond_0
    return-void

    .line 380
    .end local v2           #d:Ljavax/microedition/lcdui/Displayable;
    .restart local p0
    :catch_0
    move-exception v4

    move-object v3, v4

    .line 381
    .local v3, ex:Ljava/lang/InterruptedException;
    invoke-virtual {v3}, Ljava/lang/InterruptedException;->printStackTrace()V

    goto :goto_0
.end method
